# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-pyflakes
_pkgname=pyflakes
pkgver=2.3.0
pkgrel=1
pkgdesc='Passive checker of Python programs.'
url='https://pypi.org/project/pyflakes/#files'
arch=('any')
license=('MIT')
depends=('python2')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('e65e534139b7739e742eaa07e8803387f20bba0332247688c864ef8fab74d5851c68e9705cecae158c8d178ddbb08d54aea7ce77910979be1cc3fea57687fce4')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  mv "$pkgdir/usr/bin/$_pkgname" "$pkgdir/usr/bin/${_pkgname}2"
}

